package com.example.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.entity.Leaves;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDateTime;


/**
 * 操作notice相关数据接口
*/
@Mapper
public interface LeavesMapper extends BaseMapper<Leaves> {



    @Select("select * from leaves where create_id = #{id} and (#{time} >= begin_time and #{time} <= end_time) and status = '已批准'")
    Leaves queryIsLeaves(@Param("id") Integer id, @Param("time") LocalDateTime time);
}